/*
 * @Author       : 魏威 <1209562577@qq.com>
 * @Date         : 2022-04-30 22:08 周6
 * @Description  :
 */

import { Col, Row } from 'vant'
import { Layout, Header, Asider, Footer, Main } from './layout'

const components = {
  Layout,
  Header,
  Asider,
  Footer,
  Main,
  CRow: Row,
  CCol: Col,
}

const install = (app) => {
  Object.keys(components).forEach((key) => {
    if (key === 'CRow' || key === 'CCol') {
      app.component(key, components[key])
    } else {
      app.component(components[key]['name'], components[key])
    }
  })
}

const Mui = {
  install,
}

export default Mui
